<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

class Ajax extends CI_Controller {

    function __construct() {
        parent::__construct();
        $this->load->model('m_hoa');
        $this->load->model('m_loaihoa');
        $this->load->library('pagination');
        $this->load->helper('url');
    }

    function index() {

        $book_name = $this->input->post('sl');
        $MaHoa = 0;       
        if ($this->m_hoa->getSoLuong($MaHoa) < $book_name) {
            echo 'Vượt Quá Số Lương';
        } else {
            echo 'ok';
        }
        // }
    }

}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */